package com.snowball.demo.mvc.controller;


import com.snowball.demo.mvc.entity.Movie;
import com.snowball.demo.mvc.service.MovieService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author genezhao
 * @since 2018-07-23
 */
@RestController
@RequestMapping("/movie")
public class MovieController {

    @Autowired
    private MovieService movieService;

    @GetMapping("/{no}")
    public Movie getMovie(@PathVariable String no) {
        return movieService.queryMovieByNo(no);
    }
}

